package com.zoffy.wmsbackend.model.vo;

import com.zoffy.wmsbackend.model.entity.Warehouse;
import lombok.Data;

@Data
public class WarehouseVO {
    private Long id;
    private String warehouseCode;
    private String warehouseName;
    private String address;
    public static WarehouseVO obj2vo(Warehouse warehouse){
        if(warehouse==null){
            return new WarehouseVO();
        }
        WarehouseVO warehouseVO=new WarehouseVO();
        warehouseVO.setId(warehouse.getId());
        warehouseVO.setWarehouseCode(warehouse.getWarehouseCode());
        warehouseVO.setWarehouseName(warehouse.getWarehouseName());
        warehouseVO.setAddress(warehouse.getAddress());
        return warehouseVO;
    }
}
